extends layout

block content
    div.container
        div.row
            div.col-sm-6.col-md-4.col-md-offset-4
                h1.text-center.login-title Answers:
                    div.account-wall
                        each item in collection
                            p.text-left Title: #{item.question_title} 
                                if user.identity == 'teacher'
                                    p.text-left Student: #{item.student_name}
                            p.text-left The answer is: #{item.content}
                            if item.score == null
                                if user.identity == 'student'
                                    p.text-left Score: No score
                                else
                                    p.text-left Score: Haven't given
                            else
                                p.text-left Score: #{item.score}
                            if user.identity == 'student'
                                a(href='/answer/#{item.question_id}' class='text-left') (click here to update your answer)
                            else
                                P.text.text-left.text-danger Give score:
                                form(class='form-signin', action='/givescore/#{item.student_id}/#{item.question_id}', method='POST')
                                    input(type='text', name='score' class='form-control', placeholder='Score', required)
                                    button(class='btn btn-lg btn-primary btn-block', type='submit') Submit
                            p.text-success -------------------------------------------------
                    a(href='/home', class='text-center new-account') Home